<?php
	session_start();
	ini_set("include_path", ".:../:./includes:../includes");

	extract($_REQUEST);
	require_once("includes/constants.php");
	require_once("includes/database.php");
	
	$year = 2008;
	$index = 0;
	foreach($_REQUEST as  $key => $timestamp)  {
		if ($timestamp != '' & $key == $timestamp) {
			echo "<br/>" . $timestamp;
			$dat = date( 'Y-m-d', $timestamp );

			$mysqldate[$index++] = $dat;			
		}
	}
	if (setBankHolidays($mysqldate)) {
		$confirmationMessage = "Bank holidays have been set." ;
		header( 'Location: confirmationPage.php?' . "confirmationMessage=" .$confirmationMessage) ;
	}
	else {
		$errorMessage = "Bank holidays could not be updated. ";
		header( 'Location: errorPage.php?' . "errorMessage=" . $errorMessage ) ;
	}	
	;

?>
